<?xml version="1.0" encoding="ISO-8859-1" ?>

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:c="http://java.sun.com/jsp/jstl/core" version="2.0">
	<jsp:directive.page contentType="text/html; charset=ISO-8859-1"
		pageEncoding="ISO-8859-1" session="true" />
	<jsp:output doctype-root-element="html"
		doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
		omit-xml-declaration="true" />

	<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Gamer's Community</title>
<jsp:include page="common/headerScripts.jsp" />
<link rel="stylesheet" href="${root}/css/1col.css" />
</head>
<body>

	<jsp:include page="common/header_nav.jsp" />
	<!-- main starts -->
	<div id="main" class="grid-block">
		<div id="maininner" class="grid-box">
			<section id="content" class="grid-block">
				<!-- <div id="system-message-container"> -->
				<dl id="system-message">

					<c:if test="${(not empty msg) || (not empty usernameError) || (not empty emailError) }">
						<dt class="message">Message</dt>
						<dd class="error message fade">
							<ul>
								<li>${msg }</li>
								<li>${usernameError}</li>
								<li>${emailError}</li>
							</ul>
						</dd>
					</c:if>
				</dl>
				<!-- </div> -->
				<div id="system">
					<!-- Main Content -->
					<h1 class="title">Sign up</h1>
					<div class="description">It's free and anyone can join
					<p>All fields are required </p>
					</div>
					<form id="signupForm" action="${root }/register" method="post">
						<table id="formtable">
							<tbody>
								<tr>
									<th><label for="fname">First Name:</label></th>
									<td><div class="input-container">
											<input type="text" id="firstname" name="firstname" value="${firstname }"
												class="text_field" />
										</div></td>
								</tr>
								<tr>
									<th><label for="lname">Last Name:</label></th>
									<td><div class="input-container">
											<input type="text" id="lastname" name="lastname" value="${lastname }"
												class="text_field" />
										</div></td>
								</tr>
								<tr>
									<th><label for="lname">User Name:</label></th>
									<td><div class="input-container">
											<input type="text" id="username" name="username" value="${username }"
												class="text_field" />
									<span class="constraints"> minimum 2 characters</span>
										</div></td>
								</tr>
								<tr>
									<th><label for="email">Your Email:</label></th>
									<td><div class="input-container">
											<input type="text" id="email" name="email" value="${email }"
												class="text_field" />
<span class="constraints"> must be valid email</span>
										</div></td>
								</tr>
								<tr>
									<th><label for="pass">Password:</label></th>
									<td><div class="input-container">
											<input type="password"  id="pass" name="password"
												class="text_field" />
												<span class="constraints"> minimum 5 characters</span>
										</div></td>
								</tr>
								<tr>
									<th><label for="pass_confirm">Confirm Password:</label></th>
									<td><div class="input-container">
											<input type="password" id="confirmpass" name="confirm_password"
												class="text_field" />
												<span class="constraints"> must be the same as password</span>
										</div></td>
								</tr>
								<tr>
									<th><label for="securityquestion">Security
											question</label>
									</th>
									<td><div class="input-container">
											<input type="text" id="securityquestion" name="securityquestion" value="${securityquestion}" class="text_field" />
												
											<c:if test="${not empty questionError }">
												<label class="error"  for="secquestionerror" generated="true">${questionError} </label>
											</c:if>
										</div></td>
								</tr>
								<tr>
									<th><label for="answer">Answer</label></th>
									<td><div class="input-container">
											<input type="text" id="secanswer" name="answer" value="${answer}"
												class="text_field" />
										</div></td>
								</tr>

								<tr>
									<td>&amp;nbsp;</td>
									<td><input type="submit" name="submit" value="Register"
										class="greenButton" /></td>
								</tr>
							</tbody>
						</table>

					</form>

					<!-- Main Content ends-->

				</div>
			</section>
		</div>
		<!-- maininner end -->
	</div>
	<!-- main end -->
	<jsp:include page="common/footer.jsp" />
</body>
	</html>
</jsp:root>
